<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:replace="~{common/top :: head}">
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.7.2/css/all.min.css" integrity="sha512-Evv84Mr4kqVGRNSgIGL/F/aIDqQb7xQ2vcrdIwxfjThSH8CSR7PBEakCr51Ck+w+/U6swU2Im1vVX0SVk9ABhg==" crossorigin="anonymous" referrerpolicy="no-referrer" />
    <link rel="stylesheet" href="../css/mystore.css">
</head>
<body>

<h3>Account Information</h3>

<form th:action="@{/account/update}" th:object="${account}" method="post">
    <table>
        <p th:if="${signOnMsg}" class="error-message">
            <font color="red" th:text="${RegisterMsg}"></font>
        </p>
        <tr>
            <td>First name:</td>
            <td>
                <input type="text" th:field="*{firstName}">
            </td>
        </tr>
        <tr>
            <td>Last name:</td>
            <td>
                <input type="text" th:field="*{lastName}">
            </td>
        </tr>
        <tr>
            <td>Email:</td>
            <td>
                <input type="text" size="40" th:field="*{email}">
            </td>
        </tr>
        <tr>
            <td>Phone:</td>
            <td>
                <input type="text" th:field="*{phone}">
            </td>
        </tr>
        <tr>
            <td>Address 1:</td>
            <td>
                <input type="text" size="40" th:field="*{address1}">
            </td>
        </tr>
        <tr>
            <td>Address 2:</td>
            <td>
                <input type="text" size="40" th:field="*{address2}">
            </td>
        </tr>
        <tr>
            <td>City:</td>
            <td>
                <input type="text" th:field="*{city}">
            </td>
        </tr>
        <tr>
            <td>State:</td>
            <td>
                <input type="text" size="4" th:field="*{state}">
            </td>
        </tr>
        <tr>
            <td>Zip:</td>
            <td>
                <input type="text" size="10" th:field="*{zip}">
            </td>
        </tr>
        <tr>
            <td>Country:</td>
            <td>
                <input type="text" size="15" th:field="*{country}">
            </td>
        </tr>
    </table>

    <h3>Profile Information</h3>

    <table>
        <tr>
            <td>Language Preference:</td>
            <td>
                <select th:field="*{languagePreference}">
                    <option th:each="lang : ${languages}"
                            th:value="${lang}"
                            th:text="${lang}">
                    </option>
                </select>
            </td>
        </tr>
        <tr>
            <td>Favourite Category:</td>
            <td>
                <select th:field="*{favouriteCategoryId}">
                    <option th:each="category : ${categories}"
                            th:value="${category.id}"
                            th:text="${category.name}">
                    </option>
                </select>
            </td>
        </tr>
        <tr>
            <td>Enable MyList</td>
            <td><input type="checkbox" th:field="*{listOption}" /></td>
        </tr>
        <tr>
            <td>Enable MyBanner</td>
            <td><input type="checkbox" th:field="*{bannerOption}" /></td>
        </tr>
    </table>
    
    <button type="submit">保存</button>
</form>

<div th:replace="~{common/bottom :: footer}"></div>

</body>
</html> 